package com.factory;

import com.inter.BaseService;
import com.inter.BaseServiceImpl1;
import com.inter.BaseServiceImpl2;

/**
 * @author cyf
 * @description
 * @create 2018-09-21 11:33
 **/
public class SimpleFactory {

    public static BaseService createBaseService(int type) {
        switch (type) {
            case 1:
                return new BaseServiceImpl1();
            case 2:
                return new BaseServiceImpl2();
            default:
                return null;
        }
    }

}
